package org.example.springwebmvc.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/calculate")
@RestController
public class CalculateController {

    @RequestMapping("/sum")
    public String calculate(Integer num1,Integer num2){
        Integer sum = num1 + num2;
        return "结果为: "+sum;
    }
}
